#!/usr/bin/perl -w
use strict;

my $FA_path = "/home/aaithal/549/prj/Ecoli.10k.fa";
system("samtools faidx $FA_path") == 0 or die"command failed at $_";
print("4-------------\n");
system("samtools import $FA_path $out_sam $out_bam") == 0 or die"command failed at $_";
print("5-------------\n");
system("samtools sort $out_bam $out_sorted") == 0 or die"command failed at $_";
print "samtools sort $out_bam $out_sorted\n";
print("6-------------\n");
system("samtools index $out_sorted$bam_ext") == 0 or die"command failed at $_";
print "samtools index $out_sorted$bam_ext\n";
print("7-------------\n");
system("samtools pileup -f $FA_path $out_sorted$bam_ext > $pileup_file") == 0 or die"command failed at $_";
print("8-------------\n");

